<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#btnImport").click(function(){
				$.jBox($("#importBox").html(), {title:"导入信息登记", buttons:{"关闭":true}, 
					bottomText:"导入文件不能超过5M，仅允许导入“doc文件”！"});
			});
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
		
		function fuhe(id){
			$("#id").val(id);
			$('#demoModal').modal('show');
			 $.ajax({  
		         url : "${ctx}/numberinfo/yhcgNumberinfo/formcha",  
		         type : "POST",  
		         data : {"id":id},
		         success : function(data) { 
		        	  document.getElementById("come1").innerHTML = data.come;
		        	  document.getElementById("type1").innerHTML = data.type; 
		        	  document.getElementById("content1").innerHTML = data.content; 
		        	  document.getElementById("remark1").innerHTML = data.remark; 
		         },  
		         error : function(data) {  
		             alert("复核失败");
		         }  
		    });  
			
		}
		
		function shangchuan(){
			if($("#chuuser").val()!=null&&$("#chuuser").val()!=""){
				$("#formdatayan").submit();
			}else{
				alert("请输入复核人");
			}
			
		}
	</script>
</head>
<body>

	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/numberinfo/yhcgNumberinfo/listjie">待结案列表</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="yhcgNumberinfo" action="${ctx}/numberinfo/yhcgNumberinfo/listjie" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>编号：</label>
				<form:input path="number" htmlEscape="false" maxlength="255" class="input-medium"/>
			</li>
			<li><label>来源：</label>
				<form:select path="come" class="input-medium "   type="select[disabled]">
					<form:option value="">请选择</form:option>
					<form:options items="${fns:getDictList('come_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li>
			<label>事件类别</label>
			<form:select path="type" class="input-medium ">
					<form:option value="">请选择</form:option>
					<form:options items="${fns:getDictList('type_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li>
			<label>责任单位</label>
			<form:select  path="responsibilityunit" class="input-medium" >
				
					<form:options items="${list}" itemLabel="name" itemValue="id" htmlEscape="false"/>
					<form:option value="">请选择</form:option>
				</form:select>
			</li>
			<li>
			<label>督办单位</label>
			<form:select  path="supervisionunit" class="input-medium" >
				
					<form:options items="${list1}" itemLabel="name" itemValue="id" htmlEscape="false"/>
					<form:option value="">请选择</form:option>
				</form:select>
			</li>
			<li><label>关键字：</label>
				<form:input path="content" htmlEscape="false" class="input-medium"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
			</li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>登记编号</th>
				<th>来源</th>
				<th>事件类别</th>
				<th>转办时间</th>
				<th>还剩天数</th>
				<th>主要内容</th>
				<th>责任单位</th>
				<th>督办单位</th>
				<th>处理结果</th>
				<th>结案</th>
				<th>查看</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="yhcgNumberinfo">
			<tr>
				<td>
					${yhcgNumberinfo.number}
				</td>
				<td>
					${fns:getDictLabel(yhcgNumberinfo.come, 'come_type', '')}
				</td>
				<td>
					${fns:getDictLabel(yhcgNumberinfo.type, 'type_type', '')}
				</td>
				<td>
				<fmt:formatDate value="${yhcgNumberinfo.createtime}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
				${fns:DateList(yhcgNumberinfo.timelimit, '')}
				</td>
				<td>
				<span title="${yhcgNumberinfo.content}" >${fn:substring(yhcgNumberinfo.content, 0, 10)}</span>	
				</td>
				<td>
					${yhcgNumberinfo.zenname}
				</td>
				<td>
					${yhcgNumberinfo.duname}
				</td>
				<td>
				${fns:getDictLabel(yhcgNumberinfo.status, 'status', '')}
				</td>
				<td>
					<%-- <a onclick="fuhe('${yhcgNumberinfo.id}')"  style="cursor:pointer;">结案</a> --%>
				 <a href="${ctx}/numberinfo/yhcgNumberinfo/formnumberjie?id=${yhcgNumberinfo.id}">结案</a> 
				</td>
				<td>
				<a href="${ctx}/numberinfo/yhcgNumberinfo/formchakan?id=${yhcgNumberinfo.id}">查看</a>
				</td><%-- </shiro:hasPermission> --%>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
	<%-- <div class="modal fade" id="demoModal1" class="hide" style="top:200px;width: 300px">
        <div class="modal-dialog" >
             <div class="modal-content">
                 <div class="modal-header">
                      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                      <h4 class="modal-title" id="demoModalLabel">复核通过</h4>
                 </div>
                 <div class="modal-body" style="height: 150px;">
                 <form id="formdatayan" action="${ctx}/numberinfo/yhcgNumberinfo/formchufut" method="post" >
                 	<input type="hidden" id="idt" name="id">
			        <input type="text" name="chuuser" id="chuuser" placeholder="请输入复核人">
			        <textarea  id="yuan" name="yuan" placeholder="请输入延期原因"></textarea>
                     <button type="button" class="btn btn-default" data-dismiss="modal" onclick="shangchuan()" >延期</button>
                     </form>
                     </div>
             </div>
         </div>
    </div> --%>
<%--     <div class="modal fade" id="demoModal"  style="width: 600px;height:400px;display: none; ">
        <div class="modal-dialog" >
             <div class="modal-content">
                 <div class="modal-header">
                      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                      <h4 class="modal-title" id="demoModalLabel">结案</h4>
                 </div>
                 <div class="modal-body" style="height: 99%;">
                 <form id="formdatayan" action="${ctx}/numberinfo/yhcgNumberinfo/formchufut" method="post" >
                 <table>
                 	<tr>
                 	<td width="60px">
                 	<input type="hidden" id="id" name="id">
                 	事件来源:
                 	</td>
                 	<td id="come1">
                 	</td>
                 	<td width="60px">
                 	事件类别:
                 	</td>
                 	<td id="type1">
                 	</td>
                 	</tr>
                 	<tr>
                 	<td>主要内容:</td>
                 	<td id="content1" colspan="3"></td>
                 	</tr>
                 	<tr>
                 	<td>事件备注:</td>
                 	<td id="remark1" colspan="3">
                 	</td>
                 	</tr>
                 	<tr>
                 	<td>
                 	复核人:
                 	</td>
                 	<td colspan="3">
                 	 <input type="text" name="chuuser" id="chuuser" placeholder="请输入复核人" class="required">
                 	</td>
                 	</tr>
                	 <tr>
                 	<td>
                 	结案建议:
                 	</td>
                 	<td colspan="3">
                 	 <textarea  id="contentchu" name="contentchu" placeholder="请输入复核建议"></textarea>
			        </td>
                 	</tr>
                 	<tr>
			        <td>
			    	    结案结果
                 	</td>
                 	<td>
                 	  <select name="fuhestatus">
                 	  <option value="1">结案</option>
                 	  <option value="2"></option>
                 	  </select>
                 	</td>
                 	<td></td>
                 	</tr>
                 	</table>
                     <button type="button" class="btn btn-default" data-dismiss="modal" onclick="shangchuan()" >提交</button>
                     </form>
                     </div>
             </div>
         </div>
    </div>  --%>
</body>
</html>